﻿ <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="ChietTinhAnUong.aspx.cs" Inherits="DLV.BackEnd.Pages.ChietTinhAnUong" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="DLV.Data.Entities" %>
<%@ Import Namespace="DLV.Library.Utilities" %>

<asp:Content ID="Content1" ContentPlaceHolderID="placeHolderContent" runat="server">
    <style>
        .report {
            margin-top: 40px;
        }

        .head {
            width: 100%;
            overflow: hidden;
        }

            .head > .logo {
                width: 20%;
                float: left;
                margin-right: 1%;
            }

                .head > .logo img {
                    display: block;
                    margin: 0 auto;
                }

            .head > .table {
                width: 78%;
                float: right;
            }

                .head > .table > table {
                    width: 100%;
                    border-top: 1px solid #000;
                    border-left: 1px solid #000;
                }

                    .head > .table > table th {
                        padding: 10px 0;
                        font-size: 20px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                        background-color: #F2DCDB;
                    }

                    .head > .table > table td {
                        padding: 7px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                    }

        .service {
            width: 100%;
            margin-top: 20px;
        }

            .service > table {
                width: 100%;
                margin-bottom: 20px;
                border-top: 1px solid #000;
                border-left: 1px solid #000;
            }

                .service > table th {
                    padding: 5px 0;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                    background-color: #F2DCDB;
                }

                    .service > table th.first {
                        background-color: #92CDDC;
                        width: 8%;
                    }

                .service > table td {
                    padding: 7px;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                }

                .service > table .tr {
                    text-align: right;
                }

        div {
            margin: 0;
            padding: 0;
        }
    </style>

    <div class="report">
        <div class="head">
            <div class="logo">
                <a href="http://dulichviet.com.vn">
                    <img src="/images/logo.png" /></a>
            </div>
            <div class="table">
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th colspan="4">BẢNG TÍNH GIÁ</th>
                    </tr>
                    <tr>
                        <td><b>Tên đoàn</b></td>
                        <td><%=tourInfo.TourName %></td>
                        <td><b>Code đoàn</b></td>
                        <td>DLV<%=tourInfo.TourId %></td>
                    </tr>
                    <tr>
                        <td><b>Loại hình đoàn</b></td>
                        <td><%=tourInfo.GroupType %></td>
                        <td><b>Loại tour</b></td>
                        <td><%=tourInfo.TourTypeId %></td>
                    </tr>
                    <tr>
                        <td><b>Điểm khởi hành</b></td>
                        <td><%=tourInfo.LocationBegin %></td>
                        <td><b>Hành trình</b></td>
                        <td><%=tourInfo.ScheduleId %></td>
                    </tr>
                    <tr>
                        <td><b>Số lượng khách</b></td>
                        <td>Người lớn: <%=tourInfo.QuantityAdult %> | Trẻ em: <%=tourInfo.QuantityChild %></td>
                        <td><b>Đối tượng khách</b></td>
                        <td>Chọn đối tượng khách</td>
                    </tr>
                    <tr>
                        <td><b>Số hướng dẫn viên</b></td>
                        <td>Chọn số</td>
                        <td><b>Yêu cầu</b></td>
                        <td>Chọn loại HDV</td>
                    </tr>
                    <tr>
                        <td><b>Ngày khởi hành</b></td>
                        <td><%=tourInfo.BeginDate %></td>
                        <td><b>Ngày kết thúc</b></td>
                        <td><%=tourInfo.EndDate %></td>
                    </tr>
                    <tr>
                        <td><b>Tổng số ngày</b></td>
                        <td><%=tourInfo.QuantityDay %></td>
                        <td><b>Tổng số đêm</b></td>
                        <td><%=tourInfo.QuantityNight %></td>
                    </tr>
                    <tr>
                        <td><b>Mùa</b></td>
                        <td><%=tourInfo.Season %></td>
                        <td><b>Thị trường</b></td>
                        <td><%=tourInfo.MartName %></td>
                    </tr>
                </table>
            </div>
        </div>

        <%--An Uống--%>
        <div class="service">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th rowspan="2" class="first">ĂN UỐNG</th>
                    <th rowspan="2">LOẠI NHÀ HÀNG</th>
                    <th rowspan="2">QUỐC GIA</th>
                    <th rowspan="2">TỈNH/THÀNH PHỐ</th>
                    <th rowspan="2">NHÀ HÀNG</th>
                    <th rowspan="2">NGÀY SD DỊCH VỤ</th>
                    <th rowspan="2">BỬA ĂN</th>
                    <th rowspan="2">THỰC ĐƠN</th>
                    <th colspan="2">GIÁ/KHÁCH</th>
                    <th colspan="2">SỐ KHÁCH</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG</th>
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th>
                </tr>
                <tr>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                </tr>

                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorInfoMenu in tourMenu)
                   { %>
                <tr class="ListMenu" id="menu-<%=calculatorInfoMenu.CalculatorId %>">
                    <td></td>
                    <td><%=calculatorInfoMenu.RestaurantTypeName %></td>
                    <td><%=calculatorInfoMenu.NationalName %></td>
                    <td><%=calculatorInfoMenu.CityName %></td>
                    <td><%=calculatorInfoMenu.RestaurantFullName %></td>
                    <td><%=calculatorInfoMenu.DateBegin.ToShortDateString() %></td>
                    <td><%=calculatorInfoMenu.MenuTypeName%></td>
                    <td><%=calculatorInfoMenu.MenuName%></td>
                    <td><%=calculatorInfoMenu.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfoMenu.PriceChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfoMenu.QuantityAdults %></td>
                    <td><%=calculatorInfoMenu.QuantityChild %></td>
                    <td><%=calculatorInfoMenu.Vat %></td>
                    <td><%=(calculatorInfoMenu.TotalPriceMenuAdults + calculatorInfoMenu.TotalPriceMenuChild).ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td>
                        <input class="btnUpdateMenu" type="button" value="Cập nhật" calculatorid="<%=calculatorInfoMenu.CalculatorId %>" />
                        <input class="btnDeleteMenu" type="button" value="Xóa" calculatorid="<%=calculatorInfoMenu.CalculatorId %>" />
                    </td>
                </tr>
                <%} %>
                <tr></tr>
                <tr id="new-Menu">
                    <td></td>
                    <td>
                        <asp:DropDownList ID="ddlRestaurantTypeMenu" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>
                        <asp:DropDownList ID="ddlNationalMenu" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>
                        <asp:DropDownList ID="ddlCityMenu" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>
                        <asp:DropDownList ID="ddlRestaurantMenu" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>
                        <input type="text" id="dteBeginDateMenu" placeholder="Click để chọn ngày" readonly="readonly" runat="server" /></td>
                    <td>
                        <asp:DropDownList ID="ddlMenuTypeMenu" runat="server" Width="50px"></asp:DropDownList></td>
                    <td>
                        <asp:DropDownList ID="ddlMenuMenu" runat="server" Width="50px"></asp:DropDownList></td>
                    <td>
                        <asp:TextBox ID="txtPriceAdultsMenu" runat="server" Width="50px"></asp:TextBox></td>
                    <td>
                        <asp:TextBox ID="txtPriceChildsMenu" runat="server" Width="50px"></asp:TextBox></td>
                    <td>
                        <asp:TextBox ID="txtQuantityAdultsMenu" runat="server" Width="50px"></asp:TextBox></td>
                    <td>
                        <asp:TextBox ID="txtQuantityChildMenu" runat="server" Width="50px"></asp:TextBox></td>
                    <td>
                        <asp:TextBox ID="txtVATMenu" runat="server" Width="50px"></asp:TextBox></td>
                    <td>
                        <asp:TextBox ID="txtTotalPriceMenu" runat="server" Width="100px"></asp:TextBox></td>
                    <td>
                        <asp:TextBox ID="txtNoteMenu" runat="server" Width="50px"></asp:TextBox></td>
                    <td id="toolbar-save" class="button">
                        <input id="btnInsertMenu" type="button" value="Thêm" calculatorid="-1" />
                        <input id="btnDeleteMenu" class="btnDeleteMenu" type="button" value="hủy" calculatorid="-1" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalMenuPrices"><%=TotalMenuPrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id="TotalMenuAdults"><%=TotalMenuAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr" id="TotalMenuChild"><%=TotalMenuChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>

            </table>

        </div>
        <%--Visa--%>
        <div class="service">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th rowspan="2" class="first">VISA</th>
                    <th rowspan="2">NHÀ CUNG CẤP DV</th>
                    <th rowspan="2">LOẠI VISA</th>
                    <th rowspan="2">VISA</th>
                    <th colspan="3">CHI PHÍ NGƯỜI LỚN</th>
                    <th colspan="3">CHI PHÍ TRẺ EM</th>
                    <th colspan="2">SỐ KHÁCH</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG</th>
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th>
                </tr>
                <tr>
                    <th>LÃNH SỰ</th>
                    <th>DỊCH HỒ SƠ</th>
                    <th>CHI KHÁC</th>
                    <th>LÃNH SỰ</th>
                    <th>DỊCH HỒ SƠ</th>
                    <th>CHI KHÁC</th>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                </tr>
 
                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorInfoV in tourVisa)
                   { %>
                <tr class="ListVisa" id="menu-<%=calculatorInfoV.CalculatorId %>">
                    <td></td>
                    <td><%=calculatorInfoV.PartnerName %></td>
                    <td><%=calculatorInfoV.VisaTypeName %></td>
                    <td><%=calculatorInfoV.VisaName %></td>
                    <td><%=calculatorInfoV.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfoV.TranslateAdult.ToString("#,###", new CultureInfo("vi-VN"))  %></td>
                    <td><%=calculatorInfoV.OtherCostAdult.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorInfoV.PriceChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorInfoV.TranslateChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfoV.OtherCostChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfoV.QuantityAdults %></td>
                    <td><%=calculatorInfoV.QuantityChild %></td>
                    <td><%=calculatorInfoV.Vat %></td>
                    <td><%=(calculatorInfoV.TotalPriceVisaChild + calculatorInfoV.TotalPriceVisaAdults).ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td>
                        <input class="btnUpdateVisa" type="button" value="Cập nhật" calculatorid="<%=calculatorInfoV.CalculatorId %>" />
                        <input class="btnDeleteVisa" type="button" value="Xóa" calculatorid="<%=calculatorInfoV.CalculatorId %>" />
                    </td>
                </tr>
                <%} %>
                <tr></tr>
                <tr id="new-Visa">
                    <td></td>
                    <td>  <asp:DropDownList ID="ddlPartnerNameVisa" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>  <asp:DropDownList ID="ddlVisaTypeNameVisa" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>  <asp:DropDownList ID="ddlVisaNameVisa" runat="server" Width="70px"></asp:DropDownList></td>
                    <td> <asp:TextBox ID="txtPriceAdultsVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtTranslateAdultVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtOtherCostAdultVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtPriceChildVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtTranslateChildVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtOtherCostChildVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtQuantityAdultsVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtQuantityChildVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtVatVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtTotalPriceVisaVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td> <asp:TextBox ID="txtNoteVisaVisa" runat="server" Width="50px"></asp:TextBox> </td>
                    <td id="toolbar-save" class="button">
                        <input id="btnInsertVisa" type="button" value="Thêm" calculatorid="-1" />
                        <input id="btnDeleteVisa" class="btnDeleteVisa" type="button" value="hủy" calculatorid="-1" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalVisaPrices"><%=TotalVisaPrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id="TotalVisaAdults"><%=TotalVisaAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM </b></td>
                    <td class="tr" id="TotalVisaChild"><%=TotalVisaChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>

            </table>

        </div>
        
        <%--Dich Vu Khac--%>
         <div class="service">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th rowspan="2" class="first">DỊCH VỤ KHÁC</th>
                    <th rowspan="2">LOẠI ĐỊA ĐIỂM </th>
                    <th rowspan="2">QUỐC GIA</th>
                    <th rowspan="2">TỈNH/THÀNH PHỐ</th>
                    <th rowspan="2">ĐỊA ĐIỂM</th>
                    <th rowspan="2">NHÀ CUNG CẤP</th>
                    <th rowspan="2">DỊCH VỤ</th>
                    <th rowspan="2">NGÀY SD DỊCH VỤ</th> 
                    <th colspan="2">CHI PHÍ</th>
                    <th colspan="2">SỐ KHÁCH</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG</th>
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th> 
                </tr>
                <tr>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                </tr> 
       
                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorInfoDVK in _calculatorListDvk)
                   { %>
                <tr class="ListDvk" id="Dvk-<%=calculatorInfoDVK.CalculatorId %>">
                    <td></td>
                    <td><%=calculatorInfoDVK.LocationTypeName %></td>
                    <td><%=calculatorInfoDVK.NationalName %></td>
                    <td><%=calculatorInfoDVK.CityName %></td>
                    <td><%=calculatorInfoDVK.LocationName %></td>
                    <td><%=calculatorInfoDVK.PartnerName %></td>
                    <td><%=calculatorInfoDVK.ServiceName %></td>
                    <td><%=calculatorInfoDVK.DateBegin.ToShortDateString() %></td> 
                    <td><%=calculatorInfoDVK.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfoDVK.PriceChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=calculatorInfoDVK.QuantityAdults %></td>
                    <td><%=calculatorInfoDVK.QuantityChild %></td>
                    <td><%=calculatorInfoDVK.Vat %></td>
                    <td><%=(calculatorInfoDVK.TotalPriceDvkAdults + calculatorInfoDVK.TotalPriceDvkChild).ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td>
                        <input class="btnUpdateDvk" type="button" value="Cập nhật" calculatorid="<%=calculatorInfoDVK.CalculatorId %>" />
                        <input class="btnDeleteDvk" type="button" value="Xóa" calculatorid="<%=calculatorInfoDVK.CalculatorId %>" />
                    </td>
                </tr>
                <%} %>
                <tr></tr>
                                   
                <tr id="new-Dvk">
                    <td></td>
                    <td> <asp:DropDownList ID="ddlLocationTypeDVK" runat="server" Width="70px"></asp:DropDownList></td>
                    <td> <asp:DropDownList ID="ddlNationalDVK" runat="server" Width="70px"></asp:DropDownList></td>
                    <td> <asp:DropDownList ID="ddlCityDVK" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>  <asp:DropDownList ID="ddlLocationDVK" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>  <asp:DropDownList ID="ddlPartnerDVK" runat="server" Width="70px"></asp:DropDownList></td>
                    <td>  <asp:DropDownList ID="ddlServiceDVK" runat="server" Width="70px"></asp:DropDownList></td>
                    <td> <input type="text" id="dteBeginDateDVK" placeholder="Click để chọn ngày" readonly="readonly" runat="server" /></td>
                    
                    <td> <asp:TextBox ID="txtPriceAdultsDVK" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtPriceChildsDVK" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtQuantityAdultsDVK" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtQuantityChildDVK" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtVATDVK" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtTotalPriceDVK" runat="server" Width="100px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtNoteDVK" runat="server" Width="50px"></asp:TextBox></td>
                    <td id="toolbar-save" class="button">
                        <input id="btnInsertDvk" type="button" value="Thêm" calculatorid="-1" />
                        <input id="btnDeleteDvk" class="btnDeleteDvk" type="button" value="hủy" calculatorid="-1" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalDvkPrices"><%=TotalDVKPrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id="TotalDvkAdults"><%=TotalDVKAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr" id="TotalDvkChild"><%=TotalDVKChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>

            </table>

        </div>

         <%--Dich Hoa Hong--%>
     <div class="service"> 
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th rowspan="2" class="first">HOA HỒNG</th>
                    <th rowspan="2">NGƯỜI NHẬN </th> 
                    <th colspan="2">SÔ KHÁCH</th>
                    <th colspan="2">HOA HỒNG/KHÁCH</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG CHI HH</th>
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th> 
                </tr>
                <tr>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                </tr> 
        
                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorListHH in _calculatorListHH)
                   { %>
                <tr class="ListHH" id="HH-<%=calculatorListHH.CalculatorId %>">
                    <td></td>
                    <td><%=calculatorListHH.TravelGuideType %></td>
                    <td><%=calculatorListHH.QuantityAdults %></td>
                    <td><%=calculatorListHH.QuantityChild %></td>
                    <td><%=calculatorListHH.PriceAdults %></td>
                    <td><%=calculatorListHH.PriceChild %></td>
                    <td><%=calculatorListHH.Vat %></td> 
                    <td><%=(calculatorListHH.TotalPriceDvkAdults + calculatorListHH.TotalPriceDvkChild).ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    <td>
                        <input class="btnUpdateHH" type="button" value="Cập nhật" calculatorid="<%=calculatorListHH.CalculatorId %>" />
                        <input class="btnDeleteHH" type="button" value="Xóa" calculatorid="<%=calculatorListHH.CalculatorId %>" />
                    </td>
                </tr> 
                  
                <%} %>  
                        <tr></tr> 
                <tr id="new-HH">
                    <td></td> 
                    <td> <asp:TextBox ID="txtHoTenHH" runat="server" Width="200px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtSoNguoiLonHH" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtSoTreEmHH" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtGiaNguoiLonHH" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtGiaTreEmHH" runat="server" Width="50px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtVatHH" runat="server" Width="100px"></asp:TextBox></td>
                    <td> <asp:TextBox ID="txtTongHH" runat="server" Width="50px"></asp:TextBox></td>
                     <td> <asp:TextBox ID="txtGhiChu" runat="server" Width="50px"></asp:TextBox></td>
                    <td id="toolbar-save" class="button">
                        <input id="btnInsertHH" type="button" value="Thêm" calculatorid="-1" />
                        <input id="btnDeleteHH" class="btnDeleteHH" type="button" value="hủy" calculatorid="-1" />
                    </td>
                </tr>
                <tr>
                      <td></td>
                    <td colspan="6"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalHHPrices"><%=TotalHHPrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="6"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id="TotalHHAdults"><%=TotalHHAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="6"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr" id="TotalHHChild"><%=TotalHHChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                </tr>

            </table>
 
        </div> 
    </div>
    <link rel="stylesheet" href="/css/datepicker/jquery.ui.all.css" />
    <script type="text/javascript" src="/js/ui/jquery.ui.core.js"></script>
    <script type="text/javascript" src="/js/ui/jquery.ui.datepicker.js"></script>
    <script src="/js/jquery.price.js"></script>
    <script src="/js/jquery.address.js"></script>
    <script src="../js/jquery.ChietTinhEating.js"></script>
    <script src="../js/jquery.ChietTinhVisa.js"></script>
    <script src="../js/jquery.ChietTinhDichVuKhac.js"></script>
    <script src="../js/jquery.ChietTinhHoaHong.js"></script>
    <script src="../js/jquery.location.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#<%= dteBeginDateMenu.ClientID %>").datepicker({
                changeMonth: true,
                changeYear: true,
                dateFormat: "dd/mm/yy"
            });
            $("#<%= dteBeginDateDVK.ClientID %>").datepicker({
                changeMonth: true,
                changeYear: true,
                dateFormat: "dd/mm/yy"
            });
            var nationalItem = $('#<%=ddlNationalMenu.ClientID %>');
            var cityItem = $('#<%=ddlCityMenu.ClientID %>');
            var restaurantItem = $('#<%=ddlRestaurantMenu.ClientID %>');
            var restaurantTypeItem = $('#<%=ddlRestaurantTypeMenu.ClientID %>');
            var menuElement = $('#<%=ddlMenuMenu.ClientID %>');
            var menuTypeElement = $('#<%=ddlMenuTypeMenu.ClientID %>');
            loadCityByNational(nationalItem, cityItem);
            loadRestaurantByRestaurantType(restaurantTypeItem, restaurantItem, cityItem);
            //loadMenu('4', restaurantItem , menuTypeElement , menuElement); 
        });
    </script>

    <script type="text/javascript">
        $(document).ready(function () {
            var nationalItem = $('#<%=ddlNationalMenu.ClientID %>');
            var cityItem = $('#<%=ddlCityMenu.ClientID %>');
            var restaurantItem = $('#<%=ddlRestaurantMenu.ClientID %>');
            var restaurantTypeItem = $('#<%=ddlRestaurantTypeMenu.ClientID %>');
            var menuElement = $('#<%=ddlMenuMenu.ClientID %>');
            var menuTypeElement = $('#<%=ddlMenuTypeMenu.ClientID %>');
            var deginDate = $('#<%=dteBeginDateMenu.ClientID %>');
            var priceAdultsMenu = $('#<%=txtPriceAdultsMenu.ClientID %>');
            var priceChildsMenu = $('#<%=txtPriceChildsMenu.ClientID %>');
            var quantityAdultsMenu = $('#<%=txtQuantityAdultsMenu.ClientID %>');
            var quantityChildMenu = $('#<%=txtQuantityChildMenu.ClientID %>');
            var vatMenu = $('#<%=txtVATMenu.ClientID %>');
            var totalPriceMenu = $('#<%=txtTotalPriceMenu.ClientID %>');
            var note = $('#<%=txtNoteMenu.ClientID %>');
            var seasonTour = '<%= tourInfo.Season%>';
            var tourInfo = '<%= tourInfo.TourId%>';
            $('#btnDeleteMenu').hide();
            $('#btnDeleteVisa').hide();
            CalculatorMenu(nationalItem, cityItem, restaurantItem, restaurantTypeItem,
            menuElement, menuTypeElement, deginDate, priceAdultsMenu, priceChildsMenu, quantityAdultsMenu,
            quantityChildMenu, vatMenu, totalPriceMenu, note, seasonTour, tourInfo);
            
      
            CalculatorVisa($('#<%=ddlPartnerNameVisa.ClientID %>'), $('#<%=ddlVisaTypeNameVisa.ClientID %>'), $('#<%=ddlVisaNameVisa.ClientID %>'),
                $('#<%=txtPriceAdultsVisa.ClientID %>'), $('#<%=txtTranslateAdultVisa.ClientID %>'), $('#<%=txtOtherCostAdultVisa.ClientID %>'),
                $('#<%=txtPriceChildVisa.ClientID %>'), $('#<%=txtTranslateChildVisa.ClientID %>'), $('#<%=txtOtherCostChildVisa.ClientID %>'),
                $('#<%=txtQuantityAdultsVisa.ClientID %>'), $('#<%=txtQuantityChildVisa.ClientID %>'), $('#<%=txtVatVisa.ClientID %>'),
                $('#<%=txtTotalPriceVisaVisa.ClientID %>'), $('#<%=txtNoteVisaVisa.ClientID %>'), seasonTour, tourInfo);
          
            CalculatorDvk($('#<%=ddlLocationTypeDVK.ClientID %>'), $('#<%=ddlNationalDVK.ClientID %>'), $('#<%=ddlCityDVK.ClientID %>')
            , $('#<%=ddlLocationDVK.ClientID %>'), $('#<%=ddlPartnerDVK.ClientID %>'), $('#<%=ddlServiceDVK.ClientID %>')
            , $('#<%=dteBeginDateDVK.ClientID %>'), $('#<%=txtPriceAdultsDVK.ClientID %>'), $('#<%=txtPriceChildsDVK.ClientID %>')
            , $('#<%=txtQuantityAdultsDVK.ClientID %>'), $('#<%=txtQuantityChildDVK.ClientID %>'), $('#<%=txtVATDVK.ClientID %>')
            , $('#<%=txtTotalPriceDVK.ClientID %>'), $('#<%=txtNoteDVK.ClientID %>'), seasonTour, tourInfo);

            CalculatorHH($('#<%=txtHoTenHH.ClientID %>'), $('#<%=txtSoNguoiLonHH.ClientID %>'), $('#<%=txtSoTreEmHH.ClientID %>'),
                $('#<%=txtGiaNguoiLonHH.ClientID %>'), $('#<%=txtGiaTreEmHH.ClientID %>'), $('#<%=txtVatHH.ClientID %>'), 
                $('#<%=txtTongHH.ClientID %>'), seasonTour, tourInfo);
        });
    </script>
</asp:Content>
